{include file="include/top"}
<style>
    td,.layui-table th{
        text-align: center;!important;
    }
</style>
<body>
<div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">会员管理</a>
            <a>
              <cite>会员等级</cite></a>
          </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body ">
                    <button class="layui-btn"  lay-submit="" lay-filter="sreach" onclick="edit()"><i class="layui-icon"></i>增加</button>
                    <table class="layui-table" >
                        <thead>
                        <tr>
                            <th>编号</th>
                            <th>等级名称</th>
                            <th>满足条件</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody id="x-img">
                        {volist name="list" id="data"}
                        <tr>
                            <td>{$key+1}</td>
                            <td>{$data.ue_name}</td>
                            <td>{$data.ue_points}</td>
                            <td>
                                <button class="layui-btn layui-btn layui-btn-xs"  onclick="edit('{$data.ue_id}')" ><i class="layui-icon">&#xe642;</i>编辑</button>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    layui.use(['laydate','form'], function(){
        var laydate = layui.laydate;
        var form = layui.form;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });
    //添加查看弹框
    function edit(id = '')
    {
        var url = '{:url("User/leverAddEdit",["id"=>"getId"])}';
        url = url.replace('getId',id);
        var desc = '添加编辑';
        var arr = ['50%','70%'];
        var loading =  layer.load(0, {shade: false});
        layer.open({
            type: 2,
            title:desc,
            area: arr,
            content: url
        });
        layer.close(loading);
    }
</script>
<script>var _hmt = _hmt || []; (function() {
    var hm = document.createElement("script");
    hm.src = "https://hm.bidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
})();</script>
</html>